// 定义图书数据模型
const Sequelize = require('sequelize');
module.exports = (sequelize) => {
    var Book = sequelize.define('book', {
        isbn: { type: Sequelize.STRING },
        name: { type: Sequelize.STRING },
        author: { type: Sequelize.STRING },
        press: { type: Sequelize.STRING },
        price: { type: Sequelize.DECIMAL(10, 2) },
        pubdate: {
            type: Sequelize.DATEONLY
        }
    }, {
        freezeTableName: true,
        TimeRanges: false
    });
    return Book;
};